Conditions | 1 |
Paths | 2 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Changes | 3 | ||
Bugs | 0 | Features | 0 |
1 | 'use strict' |
||
5 | const render = (options, res, next) => { |
||
|
|||
6 | const callback = (err, html) => { |
||
7 | if (err) { |
||
8 | throw err |
||
9 | } |
||
10 | res.setHeader('Content-Type', 'text/html') |
||
11 | res.writeHead(200) |
||
12 | res.end(html) |
||
13 | } |
||
14 | return function (view, state = {}, userCallback) { |
||
15 | options.engine(path.join(options.dir, view), state, userCallback || callback) |
||
16 | } |
||
17 | } |
||
18 | |||
27 |
This check looks for parameters in functions that are not used in the function body and are not followed by other parameters which are used inside the function.